/*
 Erica Sadun, http://ericasadun.com
 iPhone Developer's Cookbook, 3.0 Edition
 BSD License, Use at your own risk
 */

#import <UIKit/UIKit.h>

CGPoint CGRectGetCenter(CGRect rect);
CGRect  CGRectMoveToCenter(CGRect rect, CGPoint center);

@interface UIView (ViewFrameGeometry)
@property CGPoint origin;
@property CGSize size;

@property (readonly) CGPoint bottomLeft;
@property (readonly) CGPoint bottomRight;
@property (readonly) CGPoint topRight;

@property CGFloat height;
@property CGFloat width;

@property CGFloat top;
@property CGFloat left;

@property CGFloat bottom;
@property CGFloat right;

- (void) moveBy: (CGPoint) delta;
- (void) scaleBy: (CGFloat) scaleFactor;
- (void) fitInSize: (CGSize) aSize;



// each makeToast method creates a view and displays it as toast
/*
 *无网络提示 文字 背景颜色
 position：[NSValue valueWithCGPoint:CGPointMake([UIScreen mainScreen].bounds.size.width/2.f, [UIScreen mainScreen].bounds.size.height-160)]
 */
- (void)makeNotNetWorkingToast:(NSString *)message backColor:(UIColor*)color;

- (void)makeToast:(NSString *)message;
- (void)makeToast:(NSString *)message duration:(CGFloat)interval position:(id)position;
- (void)makeToast:(NSString *)message duration:(CGFloat)interval position:(id)position title:(NSString *)title;
- (void)makeToast:(NSString *)message duration:(CGFloat)interval position:(id)position title:(NSString *)title image:(UIImage *)image;
- (void)makeToast:(NSString *)message duration:(CGFloat)interval position:(id)position image:(UIImage *)image;

// displays toast with an activity spinner
- (void)makeToastActivity;
- (void)makeToastActivity:(id)position;
- (void)hideToastActivity;

// the showToast methods display any view as toast
- (void)showToast:(UIView *)toast;
- (void)showToast:(UIView *)toast duration:(CGFloat)interval position:(id)point;



/**
 *加实线 两点之间
 */
-(void)addSoldLine:(float)boderwidth soldcolor:(UIColor*)color pointA:(CGPoint)pointa pointB:(CGPoint)pointb;

/**
 *加实线 小凹
 */
-(void)addSoldLine:(float)boderwidth soldcolor:(UIColor*)color Style:(NSInteger)type;

/**
 *加实线边框 Padding  内缩进 默认未0
 */
-(void)addSoldLine:(float)boderwidth soldcolor:(UIColor*)color Padding:(NSInteger)padding;

/**
 *加虚线边框
 */
-(void)addhollowSoldLine:(float)boderwidth soldcolor:(UIColor*)color;

/**
 *加虚线线 小凹
 */
-(void)addhollowSoldLine:(float)boderwidth soldcolor:(UIColor*)color Style:(NSInteger)type;


/**
 *加虚线 两点之间
 */
-(void)addhollowSoldLine:(float)boderwidth soldcolor:(UIColor*)color pointA:(CGPoint)pointa pointB:(CGPoint)pointb;

/**
 *加阴影 半径 颜色
 */
-(void)addshadowColor:(float)shadowRadius backgroundcolor:(UIColor*)backcolor  soldcolor:(UIColor*)color isALL:(BOOL)isall;

@end